From: Al Viro Date: Thu, 14 Jan 2010 03:10:57 +0000 (-0500) Subject: Fix configfs leak X-Git-Tag: archive/raspbian/4.9.13-1+rpi1~10^2~19517^2~5 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=9b6e31021122babe3b3a67b102479f740928b5eb;p=linux-4.9.git Fix configfs leak Signed-off-by: Al Viro --- diff --git a/fs/configfs/symlink.c b/fs/configfs/symlink.c index c8afa6b1d91d..32a5f46b1157 100644 --- a/fs/configfs/symlink.c +++ b/fs/configfs/symlink.c @@ -121,8 +121,10 @@ static int get_target(const char *symname, struct path *path, ret = -ENOENT; path_put(path); } - } else + } else { ret = -EPERM; + path_put(path); + } } return ret;